import request from '../../utils/request';

// 获取 导航栏
export function getNavigaion(params:{}) {
  return request({
    url: 'api/v1/navigaion',
    method: 'get',
    params: params
  }, {
    loading: true
  }, {
    text: '获取列表数据....'
  })
}
export function getnavbyid(params:{}) {
  return request({
    url: 'api/v1/get-nav-by-id',
    method: 'get',
    params: params
  }, {
    loading: true
  }, {
    text: '获取列表数据....'
  })
}

//获取banner
export function getBanner(params = {}) {
  return request({
    url: 'api/v1/banner',
    method: 'GET',
    params: params
  }, {
    loading: true
  }, {
    text: '获取列表数据....'
  })
}
//获取登录页视频
export function videoList(params = {}) {
  return request({
    url: 'api/v1/video_list',
    method: 'GET',
    params: params
  }, {
    loading: true
  }, {
    text: '获取列表数据....'
  })
}
//获取产品
export function getProductList(params = {}) {
  return request({
    url: 'api/v1/product-list',
    method: 'GET',
    params:params
  })
}
//登录
export function doLogin(params = {}) {
  return request({
    url: 'api/v1/login',
    method: 'POST',
    data: params
  })
}
//qq登录
export function qqDoLogin(params = {}) {
  return request({
    url: 'api/v1/qqLogin',
    method: 'get',
    params: params
  })
}

export function qqCodelogin(params = {}) {
  return request({
    url: 'api/v1/qqCodelogin',
    method: 'get',
    params: params
  })
}

//退出登录
export function doLogout(params = {}) {
  return request({
    url: 'api/v1/logout',
    method: 'POST',
    data: params
  })
}
//发送验证码
export function sendMobileCode(params = {}) {
  return request({
    url: 'api/v1/send-mobile-code',
    method: 'POST',
    data: params
  })
}

//底部导航
export function getFooterNav(params = {}) {
  return request({
    url: 'api/v1/footer-nav',
    method: 'GET',
    data: params
  })
}
//底部其他导航
export function getFooterOtherNav(params = {}) {
  return request({
    url: 'api/v1/footer-other-nav',
    method: 'GET',
    data: params
  })
}

//配置文件
export function webSiteConfig(params = {}) {
  return request({
    url: 'api/v1/web-site-config',
    method: 'GET',
    data: params
  })
}
//热门搜索
export function hotSearch(params = {}) {
  return request({
    url: 'api/v1/hot-search',
    method: 'GET',
    params: params
  })
}


//收藏or取消收藏
export function productCare(params = {}) {
  return request({
    url: 'api/v1/product-care',
    method: 'GET',
    params: params
  })
}
//喜不喜欢
export function notLike(params = {}) {
  return request({
    url: 'api/v1/not-like',
    method: 'GET',
    params: params
  })
}

//产品镶嵌
export function productDetail(params = {}) {
  return request({
    url: 'api/v1/product-detail',
    method: 'POST',
    data: params
  })
}

//网站悬浮按钮
export function helpBtn(params = {}) {
  return request({
    url: 'api/v1/help-btn',
    method: 'GET',
    params: params
  })
}




